package com.tct.worktimeboard.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tct.worktimeboard.entity.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedHashMap;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liyongkui
 * @since 2021-02-22
 */
public interface WorkMapper extends BaseMapper<Work> {
    Page<LinkedHashMap<String,Object>> getWork(Page<LinkedHashMap<String,Object>> page,@Param("pojo") Work pojo);

    List<Project> countByProjectAndUserId(Project project);

    List<GroupType> countGroupByGroupType(@Param("groupTypeId") Long groupTypeId);

    List<Work> countGroupByUserId(Work work);

    List<Work> countGroupByMakeUserId(Work work);

    int updateWork(@Param("pojo") Work pojo);
    List<WorkKind> countGroupByWorkKindId(String workName);

    List<WorkTask> countGroupByWorkTask(WorkTask workTask);

    List<Integer> getNotWorkTimeUserIds();
}
